import React from 'react'
// ===================================================================== Temp
import FormModal from '#cpt/temp/FormModal'
// ===================================================================== global declare
const { $fn } = window
// ===================================================================== component
class Index extends React.Component{
	state = {
		// 提交表单列表
		formData : [
			{ label: '', name: 'images', full:true, type:'upload', multiple:true, code:110, onValue: ({value})=>{
				this.setState({ imgs: value })
			} }
		]
	}
	
	open = () => {
		this.modal.open({ formRef: this.formRef })
	}
	
	render(){
		return FormModal.call(this,{ title:'图片上传', width:'90%', height:'90%', scroll:true, api:'app-upload-pic/add', okDisabled:!$fn.hasArray(this.state.imgs), close:()=>{
			this.setState({ imgs:[] })
		}})
	}
}

export default Index